Skip to content

Add FloatingPanelDetent.Preference#1163

Closed
dfeinzimer wants to merge 7211 commits intov.nextfrom
df/FloatingPanelDetent.Preference
Closed

Add FloatingPanelDetent.Preference#1163
dfeinzimer wants to merge 7211 commits intov.nextfrom
df/FloatingPanelDetent.Preference

Conversation

@dfeinzimer
Copy link
Collaborator

@dfeinzimer dfeinzimer commented May 10, 2025

In certain situations, a view presented in a floating panel needs the map view to be revealed for user interaction:

Typically, this would require the presented view to have a binding to the floating panel's detent; however, the view might not be presented in a floating panel. By providing this internal preference, Toolkit components can communicate a preferred detent to the Floating Panel without developers needing to write any code. Example usage.


yo1995 and others added 30 commits March 25, 2025 11:44
Co-authored-by: Destiny Hochhalter <117859673+des12437@users.noreply.github.com>
…reasViewTutorial.tutorial

Co-authored-by: Ting <tchen@esri.com>
No force unwrapping needed
Between 200.7.0-4889 and 4990 this resource became unavailable in swift-toolkit-daily
feat(localization): update translation
Update translations for 200.7
dfeinzimer and others added 16 commits May 2, 2025 17:28
`FeatureFormView` - Fix testCase_11_1 for visionOS
…eader.swift

Co-authored-by: Caleb Rasmussen <crasmussen@esri.com>
…wift

Co-authored-by: Caleb Rasmussen <crasmussen@esri.com>
…wift

Co-authored-by: Caleb Rasmussen <crasmussen@esri.com>
…wift

Co-authored-by: Caleb Rasmussen <crasmussen@esri.com>
…wift

Co-authored-by: Caleb Rasmussen <crasmussen@esri.com>
Co-authored-by: Caleb Rasmussen <crasmussen@esri.com>
…del.swift

Co-authored-by: Caleb Rasmussen <crasmussen@esri.com>
@dfeinzimer dfeinzimer requested a review from mhdostal May 10, 2025 00:26
@dfeinzimer dfeinzimer self-assigned this May 10, 2025
@dfeinzimer dfeinzimer added the enhancement New feature or request label May 10, 2025
mhdostal
mhdostal previously approved these changes May 12, 2025
Copy link
Member

@mhdostal mhdostal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks good and is a nice way to override the detentions when a component needs to.

@dfeinzimer
Copy link
Collaborator Author

A reservation I have with this approach is that supporting the same behavior for sheets seems problematic. Sheets (surprisingly) don't animate nicely when nested views with the presentationDetents(_:) modifier applied appear and disappear:

Should we forego this magic approach and instead have developers manage their detents by adding more cases to FeatureFormView.EditingEvent like mapInteractionStarted/mapInteractionEnded?

@mhdostal
Copy link
Member

Should we forego this magic approach and instead have developers manage their detents by adding more cases to FeatureFormView.EditingEvent like mapInteractionStarted/mapInteractionEnded?

Will this alleviate the problems with sheets?

@dfeinzimer
Copy link
Collaborator Author

Will this alleviate the problems with sheets?

It doesn't seem to. There's some discussion about this issue here, but I haven't yet been able to make the suggestions work correctly with our views.

Regardless, it might be best overall to take the sheet/panel agnostic approach and just report what the user is doing via the new cases suggested above on FeatureFormView.EditingEvent or another new enum altogether.

@mhdostal
Copy link
Member

Regardless, it might be best overall to take the sheet/panel agnostic approach and just report what the user is doing via the new cases suggested above on FeatureFormView.EditingEvent or another new enum altogether.

Ok. Let's try and make it the default/predominant use case work with little or not extra code.

@dfeinzimer dfeinzimer marked this pull request as draft May 22, 2025 18:02
@mhdostal mhdostal closed this May 22, 2025
@mhdostal mhdostal force-pushed the df/FloatingPanelDetent.Preference branch from 1934874 to d2b5cf8 Compare May 22, 2025 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants